package com.huihui.utils;

import android.content.Context;
import android.content.Intent;

import com.huihui.activity.CommentListActivity;
import com.huihui.activity.DetialActivity;
import com.huihui.activity.FeedBackActivity;
import com.huihui.activity.MainActivity;
import com.huihui.activity.PreviewAcitivty;
import com.huihui.activity.SmallVideoInfoActivity;
import com.huihui.activity.login.LoginActivity;
import com.huihui.activity.login.ReSetPswActivity;
import com.huihui.activity.login.RegisterActivity;
import com.huihui.activity.mine.MineMsgActivity;
import com.huihui.activity.mine.MineMsgSayActivity;
import com.huihui.activity.mine.MineMsgZanActivity;
import com.huihui.activity.mine.MineSettingActivity;
import com.huihui.activity.mine.MineZanActivity;
import com.huihui.activity.mine.MinefooterActivity;
import com.huihui.activity.pb.PublicActivity;
import com.huihui.activity.search.SearchActivity;
import com.huihui.activity.setting.ReportActivity;
import com.huihui.activity.setting.ReportAnswerActivity;
import com.huihui.activity.setting.SettingActivity;
import com.huihui.activity.setting.SettingBindPhoneActivity;
import com.huihui.activity.setting.SettingDefinePswActivity;
import com.huihui.activity.setting.SettingNickActivity;
import com.huihui.bean.Article;
import com.huihui.bean.Comment;
import com.huihui.bean.Goods;
import com.huihui.bean.MineZan;
import com.huihui.bean.ZuJiInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by daimeng on 2018/8/8 10:32.
 * 跳转类
 */

public class IntentUtils {

    /**
     * 主页面
     *
     * @param context
     */
    public static void gotoMainActivity(Context context) {
        Intent intent = new Intent(context, MainActivity.class);
        context.startActivity(intent);
    }

    public static void gotoLoginActivity(Context context) {
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }

    public static void gotoReportActivity(Context context,String username,long beReport_user_id,long current_report_content_id,int class_id,String content){
        Intent intent = new Intent(context, ReportActivity.class);
        intent.putExtra("username", username);
        intent.putExtra("beReport_user_id", beReport_user_id);
        intent.putExtra("current_report_content_id", current_report_content_id);
        intent.putExtra("class_id", class_id);
        intent.putExtra("content", content);
        context.startActivity(intent);
    }

    public static void gotoReportAnswerActivity(Context context,String username,long beReport_user_id,long current_report_content_id,int class_id,String content){
        Intent intent = new Intent(context, ReportAnswerActivity.class);
        intent.putExtra("username", username);
        intent.putExtra("beReport_user_id", beReport_user_id);
        intent.putExtra("current_report_content_id", current_report_content_id);
        intent.putExtra("class_id", class_id);
        intent.putExtra("content", content);
        context.startActivity(intent);
    }

    /**
     * 忘记密码
     *
     * @param context
     */
    public static void gotoReSetPswActivity(Context context, int type) {
        Intent intent = new Intent(context, ReSetPswActivity.class);
        intent.putExtra("type", type);
        context.startActivity(intent);
    }


    /**
     * 忘记密码
     *
     * @param context
     */
    public static void gotoSettingDefinePswActivity(Context context) {
        Intent intent = new Intent(context, SettingDefinePswActivity.class);
        context.startActivity(intent);
    }

    public static void gotoSearchActivity(Context context) {
        Intent intent = new Intent(context, SearchActivity.class);
        context.startActivity(intent);
    }


    /**
     * 注册
     *
     * @param context
     */
    public static void gotoRegisterActivity(Context context) {
        Intent intent = new Intent(context, RegisterActivity.class);
        context.startActivity(intent);
    }

    public static void gotoSettingActivity(Context context) {
        Intent intent = new Intent(context, SettingActivity.class);
        context.startActivity(intent);
    }

    /**
     * 发表
     *
     * @param context
     */
    public static void gotoPublicActivity(Context context) {
        Intent intent = new Intent(context, PublicActivity.class);
        context.startActivity(intent);
    }

    public static void gotoMineMsgSayActivity(Context context) {
        Intent intent = new Intent(context, MineMsgSayActivity.class);
        context.startActivity(intent);
    }


    public static void gotoMineMsgZanActivity(Context context) {
        Intent intent = new Intent(context, MineMsgZanActivity.class);
        context.startActivity(intent);
    }

    public static void gotoMineMsgActivity(Context context) {
        Intent intent = new Intent(context, MineMsgActivity.class);
        context.startActivity(intent);
    }

    public static void gotoMineZanActivity(Context context) {
        Intent intent = new Intent(context, MineZanActivity.class);
        context.startActivity(intent);
    }

    public static void gotoFeedBackActivity(Context context) {
        Intent intent = new Intent(context, FeedBackActivity.class);
        context.startActivity(intent);
    }


    public static void gotoMinefooterActivity(Context context) {
        Intent intent = new Intent(context, MinefooterActivity.class);
        context.startActivity(intent);
    }

    public static void gotoSettingBindPhoneActivity(Context context) {
        Intent intent = new Intent(context, SettingBindPhoneActivity.class);
        context.startActivity(intent);
    }

    public static void gotoMineSettingActivity(Context context) {
        Intent intent = new Intent(context, MineSettingActivity.class);
        context.startActivity(intent);
    }

    public static void gotoSettingNickNameActivity(Context context) {
        Intent intent = new Intent(context, SettingNickActivity.class);
        context.startActivity(intent);
    }

    public static void gotoDetialAcitvity(Context context, Goods goods, Article article, int position) {
        Intent intent = new Intent(context, DetialActivity.class);
        intent.putExtra("goods", goods);
        intent.putExtra("position", position);
        intent.putExtra("article", article);
        context.startActivity(intent);
    }

    public static void gotoDetialAcitvity(Context context, MineZan mineZan, int position) {
        Intent intent = new Intent(context, DetialActivity.class);
        intent.putExtra("MineZan", mineZan);
        intent.putExtra("position", position);
        context.startActivity(intent);
    }
    public static void gotoDetialAcitvity(Context context, ZuJiInfo zuJiInfo, int position) {
        Intent intent = new Intent(context, DetialActivity.class);
        intent.putExtra("zuJiInfo", zuJiInfo);
        intent.putExtra("position", position);
        context.startActivity(intent);
    }
    public static void gotoSmallVideoInfoActivity(Context context, long video_id) {
        Intent intent = new Intent(context, SmallVideoInfoActivity.class);
        intent.putExtra("video_id", video_id);
        context.startActivity(intent);
    }

    public static void gotoCommentListActivity(Context context, Comment Comment, long relation_id, int class_id) {
        Intent intent = new Intent(context, CommentListActivity.class);
        intent.putExtra("Comment", Comment);
        intent.putExtra("relation_id", relation_id);
        intent.putExtra("class_id", class_id);
        context.startActivity(intent);
    }

    public static void gotoPreviewActivity(Context context, List<String> list, int position) {
        Intent intent = new Intent(context, PreviewAcitivty.class);
        intent.putExtra("position", position);
        intent.putExtra("photoList", (ArrayList<String>) list);
        context.startActivity(intent);
    }
}
